import Vue from "vue";
import VueRouter from "vue-router";
import Home from "../views/Home.vue";
import message from "../views/message.vue";
import my from "../views/my.vue";
import wallet from "../views/wallet.vue";
import ZBrecord from "../views/ZBrecord.vue";
import GameRecord from "../views/GameRecord.vue";
import set from "../views/set.vue";
import centre from "../views/centre.vue";
import CZrecord from "../views/CZrecord.vue";
import TXrecord from "../views/TXrecord.vue";
import loginID from "../views/loginID.vue";
import BindingTel from "../views/BindingTel.vue";
import withdrawPassword from "../views/withdrawPassword.vue";
import change from "../views/change.vue";
import addition from "../views/addition.vue"; 
import bank from "../views/bank.vue";
import refill from "../views/refill.vue"; 
import DuanQi from "../views/DuanQi.vue";
import ChangQi from "../views/ChangQi.vue";
Vue.use(VueRouter);
const routes = [
  {path: "/Home",name: "Home",component: Home,meta:{
    title:"首页",
  }
},
  {path: "/message",name: "message",component: message,meta:{
    title:"消息"
  }
},
  {path: "/my",name: "my",component: my,meta:{
    title:"我的"
  }
},
  {path: "/wallet",name: "wallet",component: wallet,meta:{
    title:"钱包"
  }
},
  {path: "/ZBrecord",name: "ZBrecord",component: ZBrecord,meta:{
    title:"帐变记录"
  }
},
  {path: "/GameRecord",name: "GameRecord",component: GameRecord,meta:{
    title:"游戏记录"
  }
},
  {path: "/set",name: "set",component: set,meta:{
    title:"设置"
  }
},
  {path: "/centre",name: "centre",component: centre,meta:{
    title:"个人详情"
  }
},
  {path: "/CZrecord",name: "CZrecord",component: CZrecord,meta:{
    title:"充值记录"
  }
},
  {path: "/TXrecord",name: "TXrecord",component: TXrecord,meta:{
    title:"提现记录"
  }
},
  {path: "/loginID",name:'/loginID',component: loginID,meta:{
    title:"登录/注册"
  }
},
  {path: "/BindingTel",name:'/BindingTel',component: BindingTel,meta:{
    title:"绑定手机"
  }
},
  {path: "/withdrawPassword",name:'/withdrawPassword',component: withdrawPassword,meta:{
    title:"提现密码"
  }
},
  {path: "/change",name:'/change',component: change,meta:{
    title:"修改密码"
  }
},
  {path: "/addition",name:'/addition',component: addition,meta:{
    title:"收款账户"
  }
},
  {path: "/bank",name:'/bank',component: bank,meta:{
    title:"银行卡"
  }
},
  {path: "/refill",name:'/refill',component: refill,meta:{
    title:"充值"
  }
},
  {path: "/DuanQi",name:'/DuanQi',component: DuanQi,meta:{
    title:"伯乐短期定投"
  }
},
  {path: "/ChangQi",name:'/ChangQi',component: ChangQi,meta:{
    title:"伯乐长期定投"
  }
},
{path:"/", redirect:'/loginID'},

  // {
  //   path: "/about",
  //   name: "About",
  //   // route level code-splitting
  //   // this generates a separate chunk (about.[hash].js) for this route
  //   // which is lazy-loaded when the route is visited.
  //   component: () =>
  //     import(/* webpackChunkName: "about" */ "../views/About.vue")
  // }
];


const router = new VueRouter({
  // mode: "history",
  // fallback:true,
  // base: process.env.BASE_URL,
  routes,
  linkActiveClass:"mui-active",
});
// router.beforeEach((to, from, next) => {
//   //全局守卫 ...
//   // console.log(to.path+"当前页")
//   // console.log(from.path+"上一页")
//   // next()
//   // console.log(next)
//   // return from.path
// })

export default router;
